package top.humbleyuan.designmode.decorator;

import top.humbleyuan.designmode.decorator.decorators.ChildBless;
import top.humbleyuan.designmode.decorator.decorators.StudyBless;

/**
 * @Author HumbleYuan
 * @Date 2020/3/23 17:02
 * @Des
 */
public class client {
    public static void main(String[] args) {
        // 无特殊祈福类型
        ABTemple temple = new Temple();

        System.out.println(temple.desc());
        System.out.println(temple.blessSentence());
        System.out.println(temple.blessOp() + "\n");

        // 求子祈福
        temple = new ChildBless(temple);

        System.out.println(temple.desc());
        System.out.println(temple.blessSentence());
        System.out.println(temple.blessOp() + "\n");

        // 求子 + 求学祈福
        temple = new StudyBless(temple);

        System.out.println(temple.desc());
        System.out.println(temple.blessSentence());
        System.out.println(temple.blessOp() + "\n");
    }
}
